<template>
    <ul class="article-list list-unstyled clearfix">
        <li v-for="article in articleList" class="article-item" :class="article.images.length > 0 ? 'have-img' : ''">
            <a v-if="article.images.length > 0" v-link="{ name: 'article', params: {id: article._source.id } }" class="wrap-img">
                <img :src="article.images[0].url + '-100x100'" />
            </a>
            <div>
                <p class="list-top">
                    <a class="author-name blue-link" target="_blank">{{article._source.author}}</a>
                    <em>·</em>
                    <span class="time">{{ article._source.publish_time | customTime}}</span>
                </p>
                <h4 class="title">
                    <a v-link="{ name: 'article', params: {id: article._source.id } }" class="link-title">{{article._source.title}}</a>
                </h4>
            </div>
        </li>
    </ul>
</template>
<style>
    .blue-link {
        color: #4094c7;
    }
</style>
<script>
    export default{
        props:['articleList']
    }
</script>
